package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.WorkspaceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuyp
 * @since 2023/09/16
 */
@RestController
@Api(tags = "工作台相关接口")
@RequestMapping("/admin/workspace")
public class WorkSpaceController {
    @Autowired
    private WorkspaceService workspaceService;

    @GetMapping("/businessData")
    @ApiOperation("工作台今日数据查询")
    public Result businessData(){
        return workspaceService.businessData();
    }

    @GetMapping("/overviewOrders")
    @ApiOperation("查询订单管理数据")
    public Result overviewOrders(){
        return workspaceService.overviewOrders();
    }

    @GetMapping("/overviewDishes")
    @ApiOperation("查询菜品总览")
    public Result overviewDishes(){
        return workspaceService.overviewDishes();
    }

    @GetMapping("/overviewSetmeals")
    @ApiOperation("查询套餐总览")
    public Result overviewSetmeals(){
        return workspaceService.overviewSetmeals();
    }
}